package com.example.dubbodemoconsumer;

import com.example.dubbointerface.DemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerDemoController {

    @DubboReference
    private DemoService demoService;

    @RequestMapping("/hi")
    public String sayHi(String name) {
        return demoService.sayHi(name);
    }

    @RequestMapping("/test")
    public String test(String name) {
        return "test~";
    }

}
